package HeadTopBlock;

import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;

public class PlayerMove implements Listener {


    @EventHandler
    public void PlayerMoveListener(PlayerMoveEvent event)
    {
            Boolean flag = new temp().getflag();
            if(flag)
            {
            Player p = event.getPlayer();
            Location loc = p.getLocation();
            loc.setY(loc.getY()+5);
            Block block = loc.getBlock();
            block.setType(Material.STONE);
            }else
                {
                    event.getPlayer().sendMessage("no on!");
                }


    }


}
